package com.operation.controller;

import com.operation.beans.Result;
import com.operation.entity.WebServiceInfo;
import com.operation.service.WebServiceInfoService;
import com.operation.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WebServiceInfoController {
    @Autowired
    WebServiceInfoService webServiceInfoService;

    @RequestMapping(value = "/webServiceInfo",method = RequestMethod.GET)
    public Result getInfo(){
        return ResultUtil.success(webServiceInfoService.selectAllInfo(),0);
    }
    @RequestMapping(value = "/webServiceInfo",method = RequestMethod.POST)
    public Result updateInfo(WebServiceInfo webServiceInfo){
        return ResultUtil.success(webServiceInfoService.updateContent(webServiceInfo),0);
    }
}
